# 路由配置
from django.urls import path

from .service import \
    userService, \
    demoService,\
    productService,\
    categoryService,\
    cartService,\
    preOrderService,\
    orderService

# 路由表
routes = [

    [
        ('demo模块', 'demo/all', '全部demo', demoService.demo_all),
        ('demo模块', 'demo/add', '添加demo', demoService.demo_add),
        ('demo模块', 'demo/demo', 'demo', demoService.demo_demo),
    ],
    [
        ('cart模块', 'cart/all', '全部cart', cartService.cart_all),
        ('cart模块', 'cart/add', '添加cart', cartService.cart_add),
        ('cart模块', 'cart/update', '更新cart', cartService.cart_update),
        ('cart模块', 'cart/del', '更新cart', cartService.cart_del),
    ],
    [
        ('preOrder模块', 'preOrder/all', '全部preOrder', preOrderService.pre_order_all),
        ('preOrder模块', 'preOrder/add', '添加preOrder', preOrderService.pre_order_add),
        ('preOrder模块', 'preOrder/update', '更新preOrder',
         preOrderService.pre_order_update),
        ('preOrder模块', 'preOrder/del', '更新preOrder', preOrderService.pre_order_del),
        ('preOrder模块', 'preOrder/detail', '更新preOrder',
         preOrderService.pre_order_detail),
    ],
    [
        ('order模块', 'order/all', '全部order', orderService.order_all),
        ('order模块', 'order/add', '添加order', orderService.order_add),
        ('order模块', 'order/update', '更新order', orderService.order_update),
        ('order模块', 'order/del', '更新order', orderService.order_del),
        ('order模块', 'order/detail', '更新order', orderService.order_detail),
    ],
    [
        ('用户模块', 'user/all', '全部用户', userService.user_all),
        ('用户模块', 'user/add', '添加用户', userService.user_add),
        ('用户模块', 'user/get_code', '获取验证码', userService.user_get_code),
        ('用户模块', 'user/login', '登录', userService.user_login),
        ('用户模块', 'user/logout', '登出', userService.user_logout),
    ], [
        ('商品模块', 'product/all', '全部商品', productService.product_all),
        ('商品模块', 'product/list', '商品列表', productService.product_list),
        ('商品模块', 'product/detail', '商品详情', productService.product_detail),
        ('商品模块', 'product/add', '添加商品', productService.product_add),
        ('商品模块', 'product/banners', '添加商品', productService.banners),
        ('商品模块', 'product/search', '查找商品', productService.product_search),
        ('商品模块', 'product/add_json', '添加商品', productService.product_add_json),
    ],
    [
        ('分类模块', 'category/all', '全部分类', categoryService.category_all),
        ('分类模块', 'category/add', '添加分类', categoryService.category_add),
        ('分类模块', 'category/add_json', '添加分类', categoryService.category_add_json),
    ]

]
